//
//  BaseTableController.m
//  callmed
//
//  Created by x x on 2017/9/21.
//  Copyright © 2017年 xx. All rights reserved.
//

#import "BaseTableController.h"

@interface BaseTableController ()

@end

@implementation BaseTableController

#pragma mark - init
- (void)viewWillAppear:(BOOL)animated
{
    self.navigationController.interactivePopGestureRecognizer.delegate = self;
}

- (void)viewWillDisappear:(BOOL)animated
{
    self.navigationController.interactivePopGestureRecognizer.delegate = nil;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.view.backgroundColor = COLOR_VIEW_8;
    
    [self initWithBackButton];
    [self initWithView];
    [self initWithData];
}

- (void)initWithView
{
    
}

- (void)initWithData
{
    
}

- (void)setOpenTableHeaderRefresh:(BOOL)openTableHeaderRefresh
{
    _openTableFooterRefresh = openTableHeaderRefresh;
    
    /*
    if (openTableHeaderRefresh)
    {
        self.tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingTarget:self refreshingAction:@selector(refreshData)];
    } else
    {
        self.tableView.mj_header = NULL;
    }
     */
}

- (void)refreshData
{
    
}

- (void)setOpenTableFooterRefresh:(BOOL)openTableFooterRefresh
{
    _openTableFooterRefresh = openTableFooterRefresh;
    
    /*
    if (openTableFooterRefresh)
    {
        self.tableView.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingTarget:self refreshingAction:@selector(loadMoreData)];
    } else
    {
        self.tableView.mj_footer = NULL;
    }*/
}

- (void)loadMoreData
{
    
}

- (void)endRefreshing
{
    /*
    if ([self.tableView.mj_header isRefreshing])
    {
        [self.tableView.mj_header endRefreshing];
    }
    
    if ([self.tableView.mj_footer isRefreshing])
    {
        [self.tableView.mj_footer endRefreshing];
    }*/
}

@end
